<html>
<head><meta charset="utf-8"><title>Make rustdoc lints a tool lint instead of built-in #80527 · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html">Make rustdoc lints a tool lint instead of built-in #80527</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="223770564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223770564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223770564">(Jan 23 2021 at 19:43)</a>:</h4>
<p>Speaking of which, <span class="user-mention" data-user-id="239881">@Josh Triplett</span> do you have a second to look at <a href="https://github.com/rust-lang/rust/pull/80527#issuecomment-761934254">https://github.com/rust-lang/rust/pull/80527#issuecomment-761934254</a> ?</p>



<a name="223770710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223770710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223770710">(Jan 23 2021 at 19:45)</a>:</h4>
<p>And sure, one moment...</p>



<a name="223772709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223772709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223772709">(Jan 23 2021 at 20:07)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> Would it be worth simplifying the change by dropping lines like <code> #![cfg_attr(bootstrap, deny(...))]</code> ? Technically the bootstrap compile doesn't <em>have</em> to have that deny.</p>



<a name="223772769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223772769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223772769">(Jan 23 2021 at 20:08)</a>:</h4>
<p>Likewise the <code>             cmd.arg("-Winvalid_codeblock_attributes");</code> case.</p>



<a name="223772799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223772799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223772799">(Jan 23 2021 at 20:09)</a>:</h4>
<p>On a different note...</p>



<a name="223772815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223772815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223772815">(Jan 23 2021 at 20:09)</a>:</h4>
<p>Why did this change?</p>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gd">-  = note: `#[warn(invalid_html_tags)]` on by default</span>
<span class="gi">+  note: the lint level is defined here</span>
<span class="gi">+ --&gt; foo.rs:1:9</span>
<span class="gi">+  |</span>
<span class="gi">+1 | #![warn(rustdoc::invalid_html_tags)]</span>
<span class="gi">+  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^</span>
</code></pre></div>



<a name="223772863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223772863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223772863">(Jan 23 2021 at 20:10)</a>:</h4>
<p>Is <code>rustdoc::invalid_html_tags</code> not on by default?</p>



<a name="223772887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223772887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223772887">(Jan 23 2021 at 20:11)</a>:</h4>
<p>Some of the other tool lints still say things like <code>   = note: `#[warn(rustdoc::non_autolinks)]` on by default</code></p>



<a name="223772972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223772972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223772972">(Jan 23 2021 at 20:13)</a>:</h4>
<p>oh shoot I forgot to rebase this over <a href="https://github.com/rust-lang/rust/pull/81135">https://github.com/rust-lang/rust/pull/81135</a></p>



<a name="223772974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223772974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223772974">(Jan 23 2021 at 20:13)</a>:</h4>
<p>let me do that real quick so the diff is smaller</p>



<a name="223773038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773038">(Jan 23 2021 at 20:14)</a>:</h4>
<p>Ah, makes sense. I'm assuming that isn't related to the two items I just mentioned though?</p>



<a name="223773068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773068">(Jan 23 2021 at 20:15)</a>:</h4>
<p>no, just a courtesy thing <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="223773077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773077">(Jan 23 2021 at 20:15)</a>:</h4>
<p>I appreciate it. :)</p>



<a name="223773137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773137">(Jan 23 2021 at 20:16)</a>:</h4>
<p>OK, just finished reviewing.</p>



<a name="223773149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773149">(Jan 23 2021 at 20:16)</a>:</h4>
<p>The suggestion about bootstrap is <em>entirely</em> optional and I have no preference.</p>



<a name="223773157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773157">(Jan 23 2021 at 20:17)</a>:</h4>
<p>The other question still stands, though.</p>



<a name="223773168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773168">(Jan 23 2021 at 20:17)</a>:</h4>
<p>About "on by default" changing.</p>



<a name="223773179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773179">(Jan 23 2021 at 20:17)</a>:</h4>
<p><span class="user-mention silent" data-user-id="239881">Josh Triplett</span> <a href="#narrow/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.23.2080527/near/223772709">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> Would it be worth simplifying the change by dropping lines like <code> #![cfg_attr(bootstrap, deny(...))]</code> ? Technically the bootstrap compile doesn't <em>have</em> to have that deny.</p>
</blockquote>
<p>I can if you like; I kind of like keeping the same behavior though.</p>
<blockquote>
<p>Is rustdoc::invalid_html_tags not on by default?</p>
</blockquote>
<p>It is not, I've been to turn it on but never got around to it. <a href="https://github.com/rust-lang/rust/issues/67799">https://github.com/rust-lang/rust/issues/67799</a></p>



<a name="223773234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773234">(Jan 23 2021 at 20:18)</a>:</h4>
<p>Shouldn't the behavior of that tool lint match the existing lint?</p>



<a name="223773298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773298">(Jan 23 2021 at 20:20)</a>:</h4>
<p>I don't know why the output changed. It was allowed by default before too: <a href="https://github.com/rust-lang/rust/pull/80527/files#diff-f479f8f1d2ed5f848531b050c5df0df73129fc002048c7090b152dc66f58aa10L1909">https://github.com/rust-lang/rust/pull/80527/files#diff-f479f8f1d2ed5f848531b050c5df0df73129fc002048c7090b152dc66f58aa10L1909</a></p>



<a name="223773337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773337">(Jan 23 2021 at 20:20)</a>:</h4>
<p>the previous setup was pretty convoluted and I wouldn't be surprised if there was a bug somewhere that caused the lint system to think it was enabled even though it wasn't</p>



<a name="223773346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773346">(Jan 23 2021 at 20:20)</a>:</h4>
<p>Huh! That's very strange.</p>



<a name="223773370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773370">(Jan 23 2021 at 20:21)</a>:</h4>
<p>So despite the output saying "on by default", it isn't actually on by default, and it was only being checked because it was turned on, but the "the lint level is defined here" logic wasn't working?</p>



<a name="223773422"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773422" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773422">(Jan 23 2021 at 20:22)</a>:</h4>
<p>I think so? I'm not exactly sure</p>



<a name="223773435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773435">(Jan 23 2021 at 20:23)</a>:</h4>
<p>rustdoc does very strange things with the lint machinery</p>



<a name="223773444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773444">(Jan 23 2021 at 20:23)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/core/fn.init_lints.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/core/fn.init_lints.html</a></p>



<a name="223773448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773448">(Jan 23 2021 at 20:23)</a>:</h4>
<p>I think it would be worth looking into why it gave the wrong output. I realize that this change has the side effect of fixing that, but I'd find it much more comforting to know <em>why</em> this change is fixing that, and whether the previous bug might apply to anything else in rustc.</p>



<a name="223773460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773460">(Jan 23 2021 at 20:23)</a>:</h4>
<p>I'm not going to call that a blocker for merging this change, but I'd really appreciate it if you'd take a look.</p>



<a name="223773526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773526">(Jan 23 2021 at 20:24)</a>:</h4>
<p>(I'm much less worried about "why was it broken before"; I'm primarily concerned about "is there any chance it's still broken and this is just masking something, or the bug still applies to some other lint, or some other weird issue that may not be as evident in the future as it is at the moment".)</p>



<a name="223773547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773547">(Jan 23 2021 at 20:25)</a>:</h4>
<p>so this is even more strange, I can't replicate the output:</p>
<div class="codehilite"><pre><span></span><code>&gt; rustdoc +nightly lint.rs
warning: no documentation found for this crate&#39;s top-level module
  |
note: the lint level is defined here
 --&gt; lint.rs:2:9
  |
2 | #![warn(missing_crate_level_docs)]
  |         ^^^^^^^^^^^^^^^^^^^^^^^^
  = help: The following guide may be of use:
          https://doc.rust-lang.org/nightly/rustdoc/how-to-write-documentation.html

warning: unclosed HTML tag `xyz`
 --&gt; lint.rs:4:5
  |
4 | /// &lt;xyz&gt;
  |     ^^^^^
  |
note: the lint level is defined here
 --&gt; lint.rs:1:9
  |
1 | #![warn(invalid_html_tags)]
  |         ^^^^^^^^^^^^^^^^^
</code></pre></div>



<a name="223773600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773600">(Jan 23 2021 at 20:26)</a>:</h4>
<p>Does that mean the test was failing?</p>



<a name="223773603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773603">(Jan 23 2021 at 20:26)</a>:</h4>
<p>it can't have been, it's been there for ages</p>



<a name="223773606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773606">(Jan 23 2021 at 20:26)</a>:</h4>
<p>and rustdoc is tested on CI</p>



<a name="223773612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773612">(Jan 23 2021 at 20:27)</a>:</h4>
<p>oh! It's not a test</p>



<a name="223773614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773614">(Jan 23 2021 at 20:27)</a>:</h4>
<p>it's in lints.md</p>



<a name="223773617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773617">(Jan 23 2021 at 20:27)</a>:</h4>
<p>I don't think any of those are tested</p>



<a name="223773627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773627">(Jan 23 2021 at 20:27)</a>:</h4>
<p>I bet <span class="user-mention silent" data-user-id="210316">GuillaumeGomez</span> just forgot to update the docs when he first added the lint</p>



<a name="223773685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773685">(Jan 23 2021 at 20:28)</a>:</h4>
<p>Ah.</p>



<a name="223773703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773703">(Jan 23 2021 at 20:29)</a>:</h4>
<p>In that case, is there any chance you could arrange to make <code>lints.md</code> have its docs run as doctests?</p>



<a name="223773724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773724">(Jan 23 2021 at 20:29)</a>:</h4>
<p>(Also not a blocker, but would be nice.)</p>



<a name="223773772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773772">(Jan 23 2021 at 20:30)</a>:</h4>
<p>I would prefer not to do that here</p>



<a name="223773776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773776">(Jan 23 2021 at 20:30)</a>:</h4>
<p>can you open an issue?</p>



<a name="223773783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773783">(Jan 23 2021 at 20:30)</a>:</h4>
<p>I wasn't expecting you to do so in the same PR. :)</p>



<a name="223773785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773785">(Jan 23 2021 at 20:30)</a>:</h4>
<p>And sure.</p>



<a name="223773927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773927">(Jan 23 2021 at 20:33)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/81305">https://github.com/rust-lang/rust/issues/81305</a></p>



<a name="223773934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773934">(Jan 23 2021 at 20:33)</a>:</h4>
<p>Also linked from a comment on your PR.</p>



<a name="223773984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773984">(Jan 23 2021 at 20:34)</a>:</h4>
<p>thank you!</p>



<a name="223773986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223773986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223773986">(Jan 23 2021 at 20:34)</a>:</h4>
<p>/me snrks at you finding my freshly opened PR faster than I could finish writing a comment about it.</p>



<a name="223774009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223774009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223774009">(Jan 23 2021 at 20:35)</a>:</h4>
<p>well you did ping me on it lol</p>



<a name="223774081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223774081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223774081">(Jan 23 2021 at 20:36)</a>:</h4>
<p>(Have I mentioned how much I appreciate rust checking doctests by default, by the way?)</p>



<a name="223774088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223774088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223774088">(Jan 23 2021 at 20:36)</a>:</h4>
<p>I <em>love</em> that sample code in the documentation can never go stale.</p>



<a name="223774253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223774253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223774253">(Jan 23 2021 at 20:40)</a>:</h4>
<p>Also amused by the combination of the path to lints.md and the path I keep rustc in: <code>~/src/rust/src/doc/rustdoc/src/</code></p>



<a name="223774282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223774282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223774282">(Jan 23 2021 at 20:41)</a>:</h4>
<p>"And coming into the last dirname it's <code>src</code>, <code>rust</code>, and <code>doc</code> in a three-way tie...and <code>src</code> pulls ahead for the win!"</p>



<a name="223775537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775537">(Jan 23 2021 at 20:56)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> so this gets even stranger: there <em>are</em> tests for that directory:</p>
<div class="codehilite"><pre><span></span><code>&gt; xpy test src/doc/rustdoc
Updating only changed submodules
Submodules updated in 0.01 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s
doc tests for: /home/joshua/rustc/src/doc/rustdoc/src/advanced-features.md
Building rustdoc for stage1 (x86_64-unknown-linux-gnu)
   Compiling rustdoc v0.0.0 (/home/joshua/rustc/src/librustdoc)
   Compiling rustdoc-tool v0.0.0 (/home/joshua/rustc/src/tools/rustdoc)
    Finished release [optimized + debuginfo] target(s) in 8.34s
doc tests for: /home/joshua/rustc/src/doc/rustdoc/src/command-line-arguments.md
doc tests for: /home/joshua/rustc/src/doc/rustdoc/src/documentation-tests.md
doc tests for: /home/joshua/rustc/src/doc/rustdoc/src/how-to-write-documentation.md
doc tests for: /home/joshua/rustc/src/doc/rustdoc/src/linking-to-items-by-name.md
doc tests for: /home/joshua/rustc/src/doc/rustdoc/src/lints.md
doc tests for: /home/joshua/rustc/src/doc/rustdoc/src/passes.md
doc tests for: /home/joshua/rustc/src/doc/rustdoc/src/the-doc-attribute.md
doc tests for: /home/joshua/rustc/src/doc/rustdoc/src/unstable-features.md
doc tests for: /home/joshua/rustc/src/doc/rustdoc/src/what-is-rustdoc.md
doc tests for: /home/joshua/rustc/src/doc/rustdoc/src/what-to-include.md
    finished in 12.748 seconds
Build completed successfully in 0:00:13
</code></pre></div>



<a name="223775543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775543">(Jan 23 2021 at 20:56)</a>:</h4>
<p>this is with the broken output</p>



<a name="223775598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775598">(Jan 23 2021 at 20:57)</a>:</h4>
<p>Ok I see the issue - this is not actually a doctest, this is showing the <em>output</em> from compiling the code</p>



<a name="223775602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775602">(Jan 23 2021 at 20:57)</a>:</h4>
<p>so it has to be <code>text</code>, not <code>rust</code></p>



<a name="223775619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775619">(Jan 23 2021 at 20:57)</a>:</h4>
<p>and therefore rustdoc doesn't test it</p>



<a name="223775638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775638">(Jan 23 2021 at 20:57)</a>:</h4>
<p>what we really want is for the output to be <em>generated</em> by rustdoc, which I don't think there's a way to do currently</p>



<a name="223775682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775682">(Jan 23 2021 at 20:58)</a>:</h4>
<p>I don't actually think that's what we want.</p>



<a name="223775691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775691">(Jan 23 2021 at 20:58)</a>:</h4>
<p>Generating the output would mean that it isn't checked.</p>



<a name="223775707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775707">(Jan 23 2021 at 20:58)</a>:</h4>
<p>I can imagine having something like <code>include_str!("src/test/rustdoc/invalid_html_tags.stderr)"</code>, except that this is markdown</p>



<a name="223775711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775711">(Jan 23 2021 at 20:58)</a>:</h4>
<p>I think we want the ability for doctests to have "expected output" specified in another block.</p>



<a name="223775728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775728">(Jan 23 2021 at 20:59)</a>:</h4>
<p><span class="user-mention silent" data-user-id="239881">Josh Triplett</span> <a href="#narrow/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.23.2080527/near/223775691">said</a>:</p>
<blockquote>
<p>Generating the output would mean that it isn't checked.</p>
</blockquote>
<p>if it were a UI test, it would be checked - it would just be tested separately from doctests</p>



<a name="223775743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775743">(Jan 23 2021 at 20:59)</a>:</h4>
<p><span class="user-mention silent" data-user-id="239881">Josh Triplett</span> <a href="#narrow/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.23.2080527/near/223775711">said</a>:</p>
<blockquote>
<p>I think we want the ability for doctests to have "expected output" specified in another block.</p>
</blockquote>
<p>yeah this would be nice as a general rustdoc feature too</p>



<a name="223775790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775790">(Jan 23 2021 at 21:00)</a>:</h4>
<p>but if we can't even stabilize error codes I don't know about testing the entire output :/</p>



<a name="223775798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775798">(Jan 23 2021 at 21:00)</a>:</h4>
<p>What about something like this? (Let's see if I can get this into Zulip unmangled.)</p>
<div class="codehilite" data-code-language="markdown"><pre><span></span><code><span class="sb">```rust</span>
<span class="k">fn</span> <span class="nf">rust</span><span class="p">(</span><span class="n">code</span>: <span class="nc">Goes</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Here</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="sb">```</span>
```text,test-stderr
standard error output for the previous <span class="sb">`rust`</span> block goes here
```
</code></pre></div>



<a name="223775800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775800">(Jan 23 2021 at 21:00)</a>:</h4>
<p>seems fragile for anyone other than the compiler itself anyway, output isn't stable</p>



<a name="223775819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775819">(Jan 23 2021 at 21:01)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> that would need something like <a href="https://github.com/rust-lang/rfcs/pull/2894">https://github.com/rust-lang/rfcs/pull/2894</a> to tie the code blocks together</p>



<a name="223775821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775821">(Jan 23 2021 at 21:01)</a>:</h4>
<p>which is a much larger undertaking</p>



<a name="223775835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775835">(Jan 23 2021 at 21:01)</a>:</h4>
<p>They don't have to be <em>merged</em>; doctest running just needs to know they're connected.</p>



<a name="223775877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775877">(Jan 23 2021 at 21:02)</a>:</h4>
<p>merging is the easy part of that RFC though</p>



<a name="223775879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775879">(Jan 23 2021 at 21:02)</a>:</h4>
<p>If it makes things easier, they could even have something like <code>id=foo</code>.</p>



<a name="223775880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775880">(Jan 23 2021 at 21:02)</a>:</h4>
<p>Oh?</p>



<a name="223775890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775890">(Jan 23 2021 at 21:02)</a>:</h4>
<p>there was a lot of discussion over 'pause' and 'resume' and things like that</p>



<a name="223775900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775900">(Jan 23 2021 at 21:03)</a>:</h4>
<p>I can definitely imagine that that's endlessly bikesheddable.</p>



<a name="223775932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775932">(Jan 23 2021 at 21:03)</a>:</h4>
<p>In any case, I realize that rustc output is not stable, and thus testing it elsewhere would be problematic. (Testing stdout of some test code would be reasonable, but that's not the issue here.)</p>



<a name="223775979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775979">(Jan 23 2021 at 21:04)</a>:</h4>
<p>So, if it'd be easier to solve this problem with something like a <code>.stderr</code> file that gets doctested, that seems fine.</p>



<a name="223775985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775985">(Jan 23 2021 at 21:04)</a>:</h4>
<p><span class="user-mention silent" data-user-id="239881">Josh Triplett</span> <a href="#narrow/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527/near/223775979">said</a>:</p>
<blockquote>
<p>So, if it'd be easier to solve this problem with something like a <code>.stderr</code> file that gets doctested, that seems fine.</p>
</blockquote>
<p>well the issue is keeping it in sync with the markdown somehow</p>



<a name="223775994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223775994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223775994">(Jan 23 2021 at 21:05)</a>:</h4>
<p>I don't think there's a way to include arbitrary other files from markdown</p>



<a name="223776116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776116">(Jan 23 2021 at 21:07)</a>:</h4>
<p>True. Not without generating the markdown file at build time.</p>



<a name="223776186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776186">(Jan 23 2021 at 21:08)</a>:</h4>
<p>(Or turning the markdown file into a test module from which rustdoc generates documentation, or something.)</p>



<a name="223776193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776193">(Jan 23 2021 at 21:09)</a>:</h4>
<p>Sigh.</p>



<a name="223776208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776208">(Jan 23 2021 at 21:09)</a>:</h4>
<p>inb4 using the JSON output to write a markdown backend</p>



<a name="223776209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776209">(Jan 23 2021 at 21:09)</a>:</h4>
<p><em>markdown generating markdown</em></p>



<a name="223776211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776211">(Jan 23 2021 at 21:09)</a>:</h4>
<p>I <em>do</em> think that there's value in testing this, somehow.</p>



<a name="223776260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776260">(Jan 23 2021 at 21:10)</a>:</h4>
<p>I think it's useful, I just don't know if it's worth introducing major new features</p>



<a name="223776266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776266">(Jan 23 2021 at 21:10)</a>:</h4>
<p>the output very rarely changes in this case</p>



<a name="223776378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776378">(Jan 23 2021 at 21:13)</a>:</h4>
<p>this also touches on another issue I run into quite a bit, which is that feature gates are not very useful for rustdoc because <a href="http://docs.rs">docs.rs</a> uses nightly :(</p>



<a name="223776384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776384">(Jan 23 2021 at 21:13)</a>:</h4>
<p>part of the issue is rustdoc just doesn't use feature gates as much as it should</p>



<a name="223776446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776446">(Jan 23 2021 at 21:14)</a>:</h4>
<p>like <code>--output-format json</code> should <em>absolutely</em> need <code>-Z unstable-options</code>, <code>E0XXX</code> on doctests should have its own feature gate</p>



<a name="223776448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223776448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223776448">(Jan 23 2021 at 21:14)</a>:</h4>
<p>but people just don't add them</p>



<a name="223778126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223778126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223778126">(Jan 23 2021 at 21:37)</a>:</h4>
<p>There's infrastructure in the compiler's lint documentation for generating code blocks of output, I believe, from tests. But those aren't intended for testing; we test error codes via the usual UI test infra.</p>



<a name="223778215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223778215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223778215">(Jan 23 2021 at 21:39)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> the issue is that I want to include the error output in the documentation itself</p>



<a name="223778263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223778263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223778263">(Jan 23 2021 at 21:40)</a>:</h4>
<p>so putting something in src/test/ui doesn't let me include the same output in src/doc/rustdoc</p>



<a name="223778281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223778281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223778281">(Jan 23 2021 at 21:40)</a>:</h4>
<p>It would be reasonable to generate (rather than check) the compiler output in the rustdoc documentation, if we also made sure there were separate corresponding tests for that output.</p>



<a name="223778294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223778294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223778294">(Jan 23 2021 at 21:41)</a>:</h4>
<p>There should be <em>one</em> place where that output gets tested, but that doesn't have to be these docs; these docs could just generate the output, if that's easier.</p>



<a name="223778400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223778400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223778400">(Jan 23 2021 at 21:44)</a>:</h4>
<p>Yes, the error output <em>is</em> generated and placed into documentation.</p>



<a name="223778513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223778513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223778513">(Jan 23 2021 at 21:46)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/4d0dd02ee07bddad9136f95c9f7846ebf3eb3fc5/compiler/rustc_lint_defs/src/lib.rs#L371-L375">https://github.com/rust-lang/rust/blob/4d0dd02ee07bddad9136f95c9f7846ebf3eb3fc5/compiler/rustc_lint_defs/src/lib.rs#L371-L375</a></p>



<a name="223778539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223778539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223778539">(Jan 23 2021 at 21:47)</a>:</h4>
<p>which goes to e.g. <a href="https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#const-evaluatable-unchecked">https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#const-evaluatable-unchecked</a></p>



<a name="223779410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223779410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223779410">(Jan 23 2021 at 22:01)</a>:</h4>
<p>It looks like that's for documentation in <code>.rs</code> files, not for <code>.md</code> files.</p>



<a name="223781117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/Make%20rustdoc%20lints%20a%20tool%20lint%20instead%20of%20built-in%20%2380527/near/223781117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/Make.20rustdoc.20lints.20a.20tool.20lint.20instead.20of.20built-in.20.2380527.html#223781117">(Jan 23 2021 at 22:17)</a>:</h4>
<p>Sure, but ultimately the tooling would be similar - IIRC, those code blocks are extracted by some external tool, it's not a proc macro or anything.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>